<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="content-Type" content="text/html;charset=utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <!-- BY   TXH -->
    <meta name="description" content="同乡烩后台管理系统"/>
    <title>同乡烩后台管理系统</title>
    <link rel="stylesheet" th:href="@{css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{css/reset.css}"/>
    <link rel="stylesheet" th:href="@{css/main.css}"/>
    <link rel="stylesheet" th:href="@{css/list.css}"/>
    <script type="text/javascript" th:src="@{js/jquery-3.4.1.js}"></script>
    <script th:src="@{js/bootstrap.min.js}"></script>
    <!--	<script type="text/javascript">-->
    <!--		$(function() {-->
    <!--			var body_height = $(document).height();-->
    <!--			$(".main").css("height", body_height + "px");-->

    <!--			$("#yuancailiao").empty();-->
    <!--			$.ajax({-->
    <!--				type:"get",-->
    <!--				url:"manage/rawmaterial.do?pageNum=1",-->
    <!--				dataType:"json",-->
    <!--				success:function (data){-->
    <!--					$.each(data,function (i,n) {-->
    <!--						$("#yuancailiao").append("<div class='section  section2'>" +-->
    <!--								"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.id+"</div>" +-->
    <!--								"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.name+"</div>" +-->
    <!--								"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.price+"</div>" +-->
    <!--								"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.num+"</div>"+-->
    <!--								"<div class='margin-right-container-nav margin-right-container-nav2'><a onclick='modifym()'>修改</a>/<a onclick='deletem()'>删除</a> </div>" +-->
    <!--								"<div class='clear'></div></div>");-->
    <!--					})-->
    <!--				}-->
    <!--			})-->

    <!--		})-->
    <!--	</script>-->
</head>
<!-- 原材料列表 -->
<body>
<!-- 固定 -->
<div class="main">
    <div th:replace="admin/admin-left::left"/>
    <div class="main-left"></div>
    <!-- 操作 -->
    <div class="main-right">
        <div class="main-right-header"></div>
        <div class="main-right-navs">
            <a href="#">管理首页</a><a class="split">/</a><a>原材料管理</a><a>/</a><a>原材料列表</a>
            <!-- 搜索模块 -->
                <!-- 搜索模块 -->
                <div class="search">
                    <input type="search" id="search" name="search" placeholder="请输入具体名称" required/>
                    <button id="searchIn" type="submit"></button>
                </div>
                <script>
                    $("#searchIn").click(function () {
                        let para = {
                            search: $("#search").val()
                        }
                        $.ajax({
                            url: "/toSearchRaws",
                            type: "post",
                            data: para,
                            dataType: "html",
                            success: function (data) {
                                eval(data)
                            }
                        })
                    })
                </script>
        </div>


        <div class="margin-right-container">
            <div class="section section1">
                <div class="margin-right-container-nav">编号</div>
                <div class="margin-right-container-nav">材料名</div>
                <div class="margin-right-container-nav">价格</div>
                <div class="margin-right-container-nav">库存</div>
                <div class="margin-right-container-nav">操作</div>
                <div class="clear"></div>
            </div>

            <div id="yuancailiao">
                <div class="section  section2" th:each="raws:${raws}">
                    <!--				<div class="margin-right-container-nav margin-right-container-nav2">-->
                    <!--					<img th:src="${raws.}" />-->
                    <!--				</div>-->
                    <div class="margin-right-container-nav margin-right-container-nav2" th:text="${raws.getId()}">编号</div>
                    <div class="margin-right-container-nav margin-right-container-nav2" th:text="${raws.getName()}">猪肉</div>
                    <div class="margin-right-container-nav margin-right-container-nav2" th:text="${raws.getPrice()}">价格</div>
                    <div class="margin-right-container-nav margin-right-container-nav2" th:text="${raws.getNum()}">99</div>
                    <div class="margin-right-container-nav margin-right-container-nav2"><a id="change" th:href="@{/toUpdateRaws/}+${raws.getId}">修改</a>/<a
                            id="remove" th:href="@{/deleteRaws/}+${raws.getId()}">删除</a></div>
                    <div class="clear"></div>
                </div>
            </div>
        </div>

        <!--<div id="pagination">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true" id="previous">上一页</span>
                        </a>
                    </li>
                    <li><a href="#" onclick="fenye(1)">1</a></li>
                    <li><a href="#" onclick="fenye(2)">2</a></li>
                    <li><a href="#" onclick="fenye(3)">3</a></li>
                    <li><a href="#" onclick="fenye(4)">4</a></li>
                    <li><a href="#" onclick="fenye(5)">5</a></li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true" id="next">下一页</span>
                        </a>
                    </li>
                    <span id="txt"></span>
                </ul>

            </nav>
        </div>-->
    </div>
</div>
</body>
</html>
